package top.atluofu.scheduler.bean;

import org.quartz.Scheduler;
import org.quartz.impl.StdSchedulerFactory;

/**
 * @ClassName: QuartzScheduler
 * @description: TODO
 * @author: 有罗敷的马同学
 * @datetime: 2023Year-05Month-13Day-17:54
 * @Version: 1.0
 */
public class QuartzScheduler {
    private static Scheduler scheduler = null;

    public static Scheduler getInstance() throws Exception {
        if (scheduler == null) {
            var factory = new StdSchedulerFactory();
            scheduler = factory.getScheduler();
        }

        return scheduler;
    }
}
